﻿<controls:ChildWindow x:Class="QSHC.QSchedule.Silverlight.Views.PhysicianScheduleWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:custom="clr-namespace:QSHC.CustomControl;assembly=QSHC.CustomControl"
           Width="400" Height="Auto" 
           Title="{Binding Path=Title}" FontFamily="Tahoma" FontSize="14">
    
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Grid.Row="0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <TextBlock Grid.Row="0" Grid.Column="0" Margin="5" Height="23" Text="หน่วยบริการ:" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Right" />
                <TextBlock Grid.Row="1" Grid.Column="0" Margin="5" Height="23" Text="วันออกตรวจ:" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Right" />
                <TextBlock Grid.Row="2" Grid.Column="0" Margin="5" Height="23" Text="โควต้า:" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Right" />

                <ComboBox Grid.Row="0" Grid.Column="1" Margin="5" Width="250" DisplayMemberPath="Name" Style="{StaticResource ComboBoxStyle}" HorizontalAlignment="Left" ItemsSource="{Binding Path=Services}" SelectedItem="{Binding Path=PhysicianSchedule.Service, Mode=TwoWay}" Height="25" />
                <ComboBox Grid.Row="1" Grid.Column="1" Margin="5" Width="120" DisplayMemberPath="Name" Style="{StaticResource ComboBoxStyle}" HorizontalAlignment="Left" ItemsSource="{Binding Path=DayOfWeeks}" SelectedValuePath="ID" SelectedValue="{Binding Path=PhysicianSchedule.DayOfWeek, Mode=TwoWay}" Height="25" />
                <TextBox Grid.Row="2" Grid.Column="1" Margin="5" Width="120" Style="{StaticResource TextBoxStyle}" HorizontalAlignment="Left" Text="{Binding Path=PhysicianSchedule.Quota, Mode=TwoWay}" Height="25" />
                
                <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.ColumnSpan="2" Margin="5">
                    <TextBlock Margin="5" Text="ตั้งแต่:" Style="{StaticResource TextBlockStyle}" />
                    <custom:ThaiDatePicker SelectedDate="{Binding Mode=TwoWay, Path=PhysicianSchedule.BeginDate}" VerticalAlignment="Center" FirstDayOfWeek="Monday" />
                    <TextBlock Margin="5" Text="จนถึง:" Style="{StaticResource TextBlockStyle}" />
                    <custom:ThaiDatePicker SelectedDate="{Binding Mode=TwoWay, Path=PhysicianSchedule.EndDate}" VerticalAlignment="Center" FirstDayOfWeek="Monday" />
                </StackPanel>

            </Grid>
        </StackPanel>

        <Button x:Name="CancelButton" Content="ยกเลิก" Click="CancelButton_Click" Width="75" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" Style="{StaticResource ButtonStyle}" />
        <Button x:Name="OKButton" Content="บันทึก" Click="OKButton_Click" Width="75" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" Style="{StaticResource ButtonStyle}" />
    </Grid>
</controls:ChildWindow>